﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {

    public class Mission {

        protected var m_missionType:String;
        protected var m_xml:XML;
        private var m_visitorUserId:String;
        private var m_missionHostId:String;
        private var m_hitLimit:Boolean;
        private var m_hostPlayer:Player = null;

        public function Mission(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean, _arg5:Player=null){
            this.m_missionType = _arg1;
            this.m_visitorUserId = _arg2;
            this.m_missionHostId = _arg3;
            this.m_hitLimit = _arg4;
            this.m_hostPlayer = _arg5;
            var _local6:XMLList = Global.gameSettings.getMissionByType(_arg1);
            if (_local6){
                this.m_xml = _local6[0];
            };
        }
        public function get visitorUserId():String{
            return (this.m_visitorUserId);
        }
        public function get missionHostId():String{
            return (this.m_missionHostId);
        }
        public function get missionType():String{
            return (this.m_missionType);
        }
        public function get hitLimit():Boolean{
            return (this.m_hitLimit);
        }
        public function get hostPlayer():Player{
            return (this.m_hostPlayer);
        }
        public function get assetItemName():String{
            return (this.m_xml.assetItem);
        }
        public function get soundURL():String{
            return (Global.getAssetURL(this.m_xml.sfx.@url));
        }
        public function get cursorUrl():String{
            return (this.m_xml.cursorImage.@url);
        }
        public function get toolTip():String{
            return (ZLoc.t("Missions", (this.m_missionType + "_Tooltip")));
        }
        public function get actionText():String{
            return (ZLoc.t("Missions", (this.m_missionType + "_ActionText")));
        }
        public function get numObjects():int{
            return (this.m_xml.numObjects);
        }
        public function get inventoryItemName():String{
            return (this.m_xml.itemType);
        }

    }
}//package Classes 
